//
//  ConnectionSettingsModule.m
//  Cantrip
//
//  Created by James Callender on Tue May 07 2002.
//  Copyright (c) 2001 James Callender. All rights reserved.
//

#import "ConnectionSettingsModule.h"

@implementation ConnectionSettingsModule

- (id)init
{
    if (self = [super init]) {
        [NSBundle loadNibNamed:@"ConnectionSettingsView" owner:self];
    }
    
    return self;
}

- (void)dealloc
{
    [super dealloc];
}

- (void)awakeFromNib
{
    
}

- (NSString *)settingsDisplayName
{
    return @"Connection";
}

- (NSImage *)settingsDisplayIcon
{
    return [NSImage imageNamed:@"ConnectionIcon"];
}

- (NSView *)settingsView
{
    return oConnectionView;
}

- (NSSize)size
{
    //return NSMakeSize(526, 149);
    return NSMakeSize(530, 320);
}

- (id)world
{
    return currentWorld;
}

- (void)updateForWorld:(id)world
{
    if (world != currentWorld) {
		[self willChangeValueForKey:@"world"];
		currentWorld = world;
		[self didChangeValueForKey:@"world"];
    }
}

- (NSDictionary *)defaultWorldProperties
{
    return [NSDictionary dictionaryWithObjectsAndKeys:
		[NSNumber numberWithBool:YES], @"handleTelnetOptions",
		[NSNumber numberWithBool:YES], @"enableMCCP",
		[NSNumber numberWithBool:NO], @"connectOnOpen",
		[NSNumber numberWithInt:0], @"returnStyle",
		[NSNumber numberWithBool:NO], @"enableAutoReconnect",
		nil];
}

@end
